import service from '@/utils/request'

// @Tags ProductSpecHistory
// @Summary 创建产品规格-历史快照
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ProductSpecHistory true "创建产品规格-历史快照"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /productSpecHistory/createProductSpecHistory [post]
export const createProductSpecHistory = (data) => {
  return service({
    url: '/productSpecHistory/createProductSpecHistory',
    method: 'post',
    data
  })
}

// @Tags ProductSpecHistory
// @Summary 删除产品规格-历史快照
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ProductSpecHistory true "删除产品规格-历史快照"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /productSpecHistory/deleteProductSpecHistory [delete]
export const deleteProductSpecHistory = (params) => {
  return service({
    url: '/productSpecHistory/deleteProductSpecHistory',
    method: 'delete',
    params
  })
}

// @Tags ProductSpecHistory
// @Summary 批量删除产品规格-历史快照
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除产品规格-历史快照"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /productSpecHistory/deleteProductSpecHistory [delete]
export const deleteProductSpecHistoryByIds = (params) => {
  return service({
    url: '/productSpecHistory/deleteProductSpecHistoryByIds',
    method: 'delete',
    params
  })
}

// @Tags ProductSpecHistory
// @Summary 更新产品规格-历史快照
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ProductSpecHistory true "更新产品规格-历史快照"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /productSpecHistory/updateProductSpecHistory [put]
export const updateProductSpecHistory = (data) => {
  return service({
    url: '/productSpecHistory/updateProductSpecHistory',
    method: 'put',
    data
  })
}

// @Tags ProductSpecHistory
// @Summary 用id查询产品规格-历史快照
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.ProductSpecHistory true "用id查询产品规格-历史快照"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /productSpecHistory/findProductSpecHistory [get]
export const findProductSpecHistory = (params) => {
  return service({
    url: '/productSpecHistory/findProductSpecHistory',
    method: 'get',
    params
  })
}

// @Tags ProductSpecHistory
// @Summary 分页获取产品规格-历史快照列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取产品规格-历史快照列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /productSpecHistory/getProductSpecHistoryList [get]
export const getProductSpecHistoryList = (params) => {
  return service({
    url: '/productSpecHistory/getProductSpecHistoryList',
    method: 'get',
    params
  })
}
